package com.study.designPattern.templateMothed;

/**
 * @Author HBZ
 * @Date 2019/5/10 14:49
 * @Description
 */
public class Client {
    public static void main(String[] args) {
        //客户开着H1型号，出去遛弯了
        HummerModel h1 = new HummerH1Model();
        h1.run(); //汽车跑起来了；
        //客户开H2型号，出去玩耍了
        HummerModel h2 = new HummerH2Model();
        h2.run();

        /////////////////////增加钩子方法
        System.out.println("-----------------------------------");
        HummerH1ModelHook hook1=new HummerH1ModelHook();
        hook1.setAlarm(true);
        hook1.run();

        HummerModelHook hook2=new HummerH2ModelHook();
        hook2.run();

    }
}
